<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@page import="java.*"%>
<%@page import="java.util.Vector"%>
<%@page import="model.*"%>
<jsp:useBean id="util" class="model.UtilForm" scope="session"></jsp:useBean>
<html:html xhtml="true" lang="true">
<head>

<title><bean:message key="welcome.title"/></title>
<html:base/>
<style type="text/css">
<!--
.style3 {
	font-size: 9px;
	color: #FF0000;
}
.style5 {color: #FF0000}
body {
	background-color: #FFFFFF;
}
-->
</style><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<script type="text/javascript">
function formatar()
{ 
	if(document.getElementById("cpf_cliente").id == "cpf_cliente")
	{
		limpacampos();
		if(document.getElementById("cpf_cliente").value.length == 14)
		{	
			var xx = document.getElementById("cpf_cliente").value;
			document.getElementById("cpf_cliente").value = xx;
		}
		else
		{
			var texto = document.getElementById("cpf_cliente").value;
			var tmp = texto.substring(0,3);
			tmp +=".";
			tmp +=texto.substring(3,6);
			tmp +=".";
			tmp += texto.substring(6,9);
			tmp += "-";
			tmp += texto.substring(9);
			document.getElementById("cpf_cliente").value = tmp;
			limpacampos();
		}
	}
	if(document.getElementById("cnpj_cliente").id == "cnpj_cliente")
	{
		limpacampos();
		if(document.getElementById("cnpj_cliente").value.length == 18)
		{	
			var xx = document.getElementById("cnpj_cliente").value;
			document.getElementById("cnpj_cliente").value = xx;
		}
		else
		{
			var texto = document.getElementById("cnpj_cliente").value;
			var tmp = texto.substring(0,2);
			tmp +=".";
			tmp += texto.substring(2,5);
			tmp +=".";
			tmp += texto.substring(5,8);
			tmp +="/";
			tmp += texto.substring(8,12);
			tmp +="-";
			tmp += texto.substring(12,15);
			document.getElementById("cnpj_cliente").value = tmp;
			limpacampos();
		}
	}
	
}
function limpacampos()
{	
	if(document.getElementById("cpf_cliente").value.length < 5)
		{	
			document.getElementById("cpf_cliente").value = "";
		}
		if(document.getElementById("cnpj_cliente").value.length < 6)
		{	
			document.getElementById("cnpj_cliente").value = "";
		}
	
}
</script>
<body>
<p>&nbsp;</p>
<html:errors/>
<html:form action="/CadastramentofinalSolicitacao">
<table width="421" height="214" border="0" align="center" bordercolor="#FFFFFF" bgcolor="#FFFFFF">
  <tr>
    <td colspan="2"><div align="center"><strong>Solicita&ccedil;&atilde;o Cadastrada com Sucesso</strong></div></td>
  </tr>
  <tr>
    <td><strong>C&oacute;digo  Solicita&ccedil;&atilde;o</strong></td>
    <td><html:text property="cod_solicitacao" disabled="false" readonly="true" size="8" value="<%=Integer.toString(util.getCod_solicitacao())%>" ></html:text></td>
  </tr>
  
     <tr>
    <td><html:link  action="Menu2"><bean:message key="menu.principal"/></html:link></td>
  </tr>
</table>
</html:form>
</body>
</html:html>